#include <stdlib.h>
#include <stdio.h>
#include <ctime>
int main()
{
	srand(time(0));
	int n;
	scanf("%d", &n);
	printf("%d %d\n", rand()%n+1, rand()%n+1);
	return 0;
}